package io.github.lee.app.unsplash.repository.api

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit

@Module
@InstallIn(SingletonComponent::class)
object ApiModule {
    @Provides
    fun photoApi(retrofit: Retrofit): PhotoApi =
        retrofit.create(PhotoApi::class.java)


    @Provides
    fun topicApi(retrofit: Retrofit): TopicApi =
        retrofit.create(TopicApi::class.java)

    @Provides
    fun userApi(retrofit: Retrofit): UserApi =
        retrofit.create(UserApi::class.java)

    @Provides
    fun searchApi(retrofit: Retrofit): SearchApi =
        retrofit.create(SearchApi::class.java)
}